﻿using System.Configuration;
using System;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.Mail;
using System.Data;
using System.Data.SqlClient;
using System.Threading;
using System.Globalization;

namespace CommontLibrary
{
    /// <summary>
    /// Summary description for Wbase.
    /// </summary>
    public class WebBaseControl : System.Web.UI.Page
    {
        #region "Fuction load"
        public string strConsMenuImageURL, strConsMenuImagePath;
        public string strConsImageNewURL, strConsImageNewPath;
        public string strConsFileNewURL, strConsFileNewPath;
        public string strConsFileSignUpURL, strConsFileSignUpPath;
        public string strConsImageURL, strConsImagePath;
        public string strConsReportURL, strConsReportPath;
        public string strConsFileURL, strConsFilePath;
        public string strConsFileVideoURL, strConsFileVideoPath;
        public string strConsMenuURL, strConsMenuPath;
        public string strConsLanguageURL, strConsLanguagePath;
        public string strConsBannerURL, strConsBannerPath;
        public string strConsFileDocumentURL, strConsFileDocumentPath;
        public string strConsFileForumURL, strConsFileForumPath;
        public string strConsFileMailURL, strConsFileMailPath;

        public WebBaseControl()
        {

        }

        override protected void OnInit(EventArgs e)
        {
            string strPath = ConfigurationSettings.AppSettings["WebsiteSite"].Trim();
            string strURL = ConfigurationSettings.AppSettings["WebsiteSiteURL"].Trim();
            strConsBannerURL = strURL + "/Attach/Banner/";
            strConsBannerPath = Server.MapPath(strPath + "/Attach/Banner/");

            strConsImageURL = strURL + "/Attach/Images/";
            strConsImagePath = Server.MapPath(strPath + "/Attach/Images/");

            strConsImageNewURL = strURL + "/Attach/ImagesNew/";
            strConsImageNewPath = Server.MapPath(strPath + "/Attach/ImagesNew/");

            strConsFileNewURL = strURL + "/Attach/ImagesNew/File/";
            strConsFileNewPath = Server.MapPath(strPath + "/Attach/ImagesNew/File/");

            strConsReportURL = strURL + "/Attach/Report/";
            strConsReportPath = Server.MapPath(strPath + "/Attach/Report/");

            strConsFileURL = strURL + "/Attach/Files/";
            strConsFilePath = Server.MapPath(strPath + "/Attach/Files/");

            strConsFileVideoURL = strURL + "/Attach/FilesVideo/";
            strConsFileVideoPath = Server.MapPath(strPath + "/Attach/FilesVideo/");

            strConsMenuURL = strURL + "/Attach/Menu/";
            strConsMenuPath = Server.MapPath(strPath + "/Attach/Menu/");

            strConsLanguageURL = strURL + "/Attach/Language/";
            strConsLanguagePath = Server.MapPath(strPath + "/Attach/Language/");

            strConsMenuImageURL = strURL + "/Attach/MenuImages/";
            strConsMenuImagePath = Server.MapPath(strPath + "/Attach/MenuImages/");

            strConsFileDocumentURL = strURL + "/Attach/FileDocuments/";
            strConsFileDocumentPath = Server.MapPath(strPath + "/Attach/FileDocuments/");

            strConsFileForumURL = strURL + "/Attach/Forum/File/";
            strConsFileForumPath = Server.MapPath(strPath + "/Attach/Forum/File/");

            strConsFileMailURL = strURL + "/Attach/Mail/";
            strConsFileMailPath = Server.MapPath(strPath + "/Attach/Mail/"); 

            base.OnInit(e);
        }
        #endregion
    }
}
